﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Globalization;
using System.Text;
using System.Text.RegularExpressions;

namespace Nature
{	
	public partial class IdealGasMixture 
	{
		public readonly ModelObject Model;

		[Flags]
		enum StateChangeCategory
		{
			None = 0,
			Temperature = 1,
			Pressure = 2,
			Density = 4,
			Composition = 8
		}

		#region Private Fields
		 
		
		/// <summary>
		/// Mixture temperature [K]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private ValueHolder m_temperature = new ValueHolder();  
		
		/// <summary>
		/// Mixture temperature [log(K)]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private ValueHolder m_temperatureLog = new ValueHolder();  
		
		/// <summary>
		/// Mixture Pressure [Pa]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private ValueHolder m_pressure = new ValueHolder();  
		
		/// <summary>
		/// Mixture Pressure [log(atm)]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private ValueHolder m_pressureAtmLog = new ValueHolder();  
		
		/// <summary>
		/// Mixture Molar Density [mol/m**3]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private ValueHolder m_molarDensity = new ValueHolder();  
		
		/// <summary>
		/// Mixture Mass Density [kg/m**3]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private ValueHolder m_massDensity = new ValueHolder();  
		
		/// <summary>
		/// Mixture Molar Mass [kg/mol]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private ValueHolder m_molarMass = new ValueHolder();  
		
		/// <summary>
		/// Mixture non-dimensional Ideal Gas Isobaric Heat Capacities (Cp) [~]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private ValueHolder m_cp = new ValueHolder();  
		
		/// <summary>
		/// Mixture specific Ideal Gas Isobaric Heat Capacities (Cp) [J/K/kg]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private ValueHolder m_specificCp = new ValueHolder();  
		
		/// <summary>
		/// Mixture molar Ideal Gas Isobaric Heat Capacities (Cp) [J/K/mol]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private ValueHolder m_molarCp = new ValueHolder();  
		
		/// <summary>
		/// Mixture non-dimensional Ideal Gas Isochoric Heat Capacities (Cv) [~]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private ValueHolder m_cv = new ValueHolder();  
		
		/// <summary>
		/// Mixture specific Ideal Gas Isochoric Heat Capacities (Cv) [J/K/kg]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private ValueHolder m_specificCv = new ValueHolder();  
		
		/// <summary>
		/// Mixture molar Ideal Gas Isochoric Heat Capacities (Cv) [J/K/mol]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private ValueHolder m_molarCv = new ValueHolder();  
		
		/// <summary>
		/// Mixture non-dimensional Ideal Gas Enthalpy (H) [~]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private ValueHolder m_h = new ValueHolder();  
		
		/// <summary>
		/// Mixture specific Ideal Gas Enthalpy (H) [J/kg]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private ValueHolder m_specificH = new ValueHolder();  
		
		/// <summary>
		/// Mixture molar Ideal Gas Enthalpy (H) [J/mol]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private ValueHolder m_molarH = new ValueHolder();  
		
		/// <summary>
		/// Mixture non-dimensional Ideal Gas Energy (U) [~]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private ValueHolder m_u = new ValueHolder();  
		
		/// <summary>
		/// Mixture specific Ideal Gas Energy (U) [J/kg]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private ValueHolder m_specificU = new ValueHolder();  
		
		/// <summary>
		/// Mixture molar Ideal Gas Energy (U) [J/mol]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private ValueHolder m_molarU = new ValueHolder();  
		
		/// <summary>
		/// Mixture non-dimensional Ideal Gas Entropy (S) [~]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private ValueHolder m_s = new ValueHolder();  
		
		/// <summary>
		/// Mixture specific Ideal Gas Entropy (S) [J/K/kg]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private ValueHolder m_specificS = new ValueHolder();  
		
		/// <summary>
		/// Mixture molar Ideal Gas Entropy (S) [J/K/mol]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private ValueHolder m_molarS = new ValueHolder();  
		
		/// <summary>
		/// Mixture non-dimensional Ideal Gas Gibbs Energy (G) [~]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private ValueHolder m_g = new ValueHolder();  
		
		/// <summary>
		/// Mixture specific Ideal Gas Gibbs Energy (G) [J/kg]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private ValueHolder m_specificG = new ValueHolder();  
		
		/// <summary>
		/// Mixture molar Ideal Gas Gibbs Energy (G) [J/mol]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private ValueHolder m_molarG = new ValueHolder();  
		
		/// <summary>
		/// Mixture non-dimensional Ideal Gas Helmholtz Energy (F) [~]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private ValueHolder m_f = new ValueHolder();  
		
		/// <summary>
		/// Mixture specific Ideal Gas Helmholtz Energy (F) [J/kg]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private ValueHolder m_specificF = new ValueHolder();  
		
		/// <summary>
		/// Mixture molar Ideal Gas Helmholtz Energy (F) [J/mol]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private ValueHolder m_molarF = new ValueHolder();  
		
		/// <summary>
		/// Mixture Ideal Gas Speed of Sound (C) [m/sec]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private ValueHolder m_speedOfSound = new ValueHolder();  
		
		/// <summary>
		/// Mixture ideal gas dynamic viscosities (Nu_k) [Pa * sec]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private ValueHolder m_viscosity = new ValueHolder();  
		
		/// <summary>
		/// Mixture ideal gas thermal conductivities (La_k) [W/m/K]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private ValueHolder m_thermalConductivity = new ValueHolder();  
		
		/// <summary>
		/// Mixture ideal gas self diffusivities (D_kk) [m**2/sec]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private ValueHolder m_diffusivity = new ValueHolder();  
		 
		
		/// <summary>
		/// Species Mass Fractions
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private DoubleArrayHolder m_elementMassFractions;  
		
		/// <summary>
		/// Species Mole Fractions
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private DoubleArrayHolder m_elementMoleFractions;  
		
		/// <summary>
		/// Species Mass Fractions
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private DoubleArrayHolder m_speciesMassFractions;  
		
		/// <summary>
		/// Species Mole Fractions
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private DoubleArrayHolder m_speciesMoleFractions;  
		
		/// <summary>
		/// Species Mole Fraction logarithm
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private DoubleArrayHolder m_speciesMoleFractionsLog;  
		
		/// <summary>
		/// Species Molar Concentrations
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private DoubleArrayHolder m_speciesMolarConcentrations;  
		
		/// <summary>
		/// Species non-dimensional Ideal Gas Isobaric Heat Capacities (Cp) [~]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private DoubleArrayHolder m_speciesCp;  
		
		/// <summary>
		/// Species specific Ideal Gas Isobaric Heat Capacities (Cp) [J/K/kg]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private DoubleArrayHolder m_speciesSpecificCp;  
		
		/// <summary>
		/// Species molar Ideal Gas Isobaric Heat Capacities (Cp) [J/K/mol]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private DoubleArrayHolder m_speciesMolarCp;  
		
		/// <summary>
		/// Species non-dimensional Ideal Gas Isochoric Heat Capacities (Cv) [~]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private DoubleArrayHolder m_speciesCv;  
		
		/// <summary>
		/// Species specific Ideal Gas Isochoric Heat Capacities (Cv) [J/K/kg]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private DoubleArrayHolder m_speciesSpecificCv;  
		
		/// <summary>
		/// Species molar Ideal Gas Isochoric Heat Capacities (Cv) [J/K/mol]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private DoubleArrayHolder m_speciesMolarCv;  
		
		/// <summary>
		/// Species non-dimensional Ideal Gas Enthalpy (H) [~]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private DoubleArrayHolder m_speciesH;  
		
		/// <summary>
		/// Species specific Ideal Gas Enthalpy (H) [J/kg]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private DoubleArrayHolder m_speciesSpecificH;  
		
		/// <summary>
		/// Species molar Ideal Gas Enthalpy (H) [J/mol]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private DoubleArrayHolder m_speciesMolarH;  
		
		/// <summary>
		/// Species non-dimensional Ideal Gas Energy (U) [~]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private DoubleArrayHolder m_speciesU;  
		
		/// <summary>
		/// Species specific Ideal Gas Energy (U) [J/kg]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private DoubleArrayHolder m_speciesSpecificU;  
		
		/// <summary>
		/// Species molar Ideal Gas Energy (U) [J/mol]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private DoubleArrayHolder m_speciesMolarU;  
		
		/// <summary>
		/// Species non-dimensional Ideal Gas Entropy (S) [~]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private DoubleArrayHolder m_speciesS;  
		
		/// <summary>
		/// Species specific Ideal Gas Entropy (S) [J/K/kg]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private DoubleArrayHolder m_speciesSpecificS;  
		
		/// <summary>
		/// Species molar Ideal Gas Entropy (S) [J/K/mol]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private DoubleArrayHolder m_speciesMolarS;  
		
		/// <summary>
		/// Species non-dimensional Ideal Gas Gibbs Energy (G) [~]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private DoubleArrayHolder m_speciesG;  
		
		/// <summary>
		/// Species specific Ideal Gas Gibbs Energy (G) [J/kg]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private DoubleArrayHolder m_speciesSpecificG;  
		
		/// <summary>
		/// Species molar Ideal Gas Gibbs Energy (G) [J/mol]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private DoubleArrayHolder m_speciesMolarG;  
		
		/// <summary>
		/// Species non-dimensional Ideal Gas Helmholtz Energy (F) [~]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private DoubleArrayHolder m_speciesF;  
		
		/// <summary>
		/// Species specific Ideal Gas Helmholtz Energy (F) [J/kg]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private DoubleArrayHolder m_speciesSpecificF;  
		
		/// <summary>
		/// Species molar Ideal Gas Helmholtz Energy (F) [J/mol]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private DoubleArrayHolder m_speciesMolarF;  
		
		/// <summary>
		/// Species ideal gas dynamic viscosities (Nu_k) [Pa * sec]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private DoubleArrayHolder m_speciesViscosities;  
		
		/// <summary>
		/// Species ideal gas thermal conductivities (La_k) [W/m/K]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private DoubleArrayHolder m_speciesThermalConductivities;  
		
		/// <summary>
		/// Species ideal gas self diffusivities (D_kk) [m**2/sec]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private DoubleArrayHolder m_speciesSelfDiffusivities;  
		
		/// <summary>
		/// Species ideal gas self diffusivities as atmospheric pressure (D_kk) [m**2/sec]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private DoubleArrayHolder m_speciesSelfDiffusivitiesAtP0;  
		 
		
		/// <summary>
		/// Species ideal gas diffusivities (D_jk) [m**2/sec]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private DoubleMatrixHolder m_speciesDiffusivities;  
		
		/// <summary>
		/// Species ideal gas diffusivities at atmospheric pressure (D_jk) [m**2/sec]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private DoubleMatrixHolder m_speciesDiffusivitiesAtP0;  
		
		/// <summary>
		/// Species ideal gas thermal diffusion ratios (Om_ij) [~]
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private DoubleMatrixHolder m_speciesThermalDiffusionRatios;  
		
		/// <summary>
		/// Wilke matrix
		/// </summary>
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private DoubleMatrixHolder m_speciesWilkeMatrix;  
		#endregion
	
		internal IdealGasMixture(ModelObject model, IMixtureDefinition mixtureDefinition)
		{
			OnCreating();  
            calc_speedofsound = __calc_speedofsound;  
            calc_pressure_from_eos = __calc_pressure_from_eos;  
            calc_temperature_from_eos = __calc_temperature_from_eos;  
            calc_molardensity_from_eos = __calc_molardensity_from_eos;  
            calc_massdensity_from_molardensity = __calc_massdensity_from_molardensity;  
            calc_molarmass_from_xk = __calc_molarmass_from_xk;  
            calc_temperaturelog = __calc_temperaturelog;  
            calc_pressureatmlog = __calc_pressureatmlog;  
            calc_cp_from_cpk = __calc_cp_from_cpk;  
            calc_cv_from_cvk = __calc_cv_from_cvk;  
            calc_h_from_hk = __calc_h_from_hk;  
            calc_u_from_uk = __calc_u_from_uk;  
            calc_g_from_gk = __calc_g_from_gk;  
            calc_f_from_fk = __calc_f_from_fk;  
            calc_s_from_sk = __calc_s_from_sk;  
            calc_molarcp_from_cp = __calc_molarcp_from_cp;  
            calc_molarcv_from_cv = __calc_molarcv_from_cv;  
            calc_molarh_from_h = __calc_molarh_from_h;  
            calc_molaru_from_u = __calc_molaru_from_u;  
            calc_molarg_from_g = __calc_molarg_from_g;  
            calc_molarf_from_f = __calc_molarf_from_f;  
            calc_molars_from_s = __calc_molars_from_s;  
            calc_specificcp_from_cp = __calc_specificcp_from_cp;  
            calc_specificcv_from_cv = __calc_specificcv_from_cv;  
            calc_specifich_from_h = __calc_specifich_from_h;  
            calc_specificu_from_u = __calc_specificu_from_u;  
            calc_specificg_from_g = __calc_specificg_from_g;  
            calc_specificf_from_f = __calc_specificf_from_f;  
            calc_specifics_from_s = __calc_specifics_from_s;  
            calc_visc = __calc_visc;  
            calc_cond = __calc_cond;  
            calc_diff = __calc_diff;   
            calc_elxk = __calc_elxk;  
            calc_elyk = __calc_elyk;  
            calc_ck = __calc_ck;  
            calc_xklog = __calc_xklog;  
            calc_xk_from_yk = __calc_xk_from_yk;  
            calc_yk_from_xk = __calc_yk_from_xk;  
            calc_ck_from_xk = __calc_ck_from_xk;  
            calc_cpk = __calc_cpk;  
            calc_cvk = __calc_cvk;  
            calc_hk = __calc_hk;  
            calc_uk = __calc_uk;  
            calc_sk = __calc_sk;  
            calc_gk = __calc_gk;  
            calc_fk = __calc_fk;  
            calc_molarcpk = __calc_molarcpk;  
            calc_molarcvk = __calc_molarcvk;  
            calc_molarhk = __calc_molarhk;  
            calc_molaruk = __calc_molaruk;  
            calc_molarsk = __calc_molarsk;  
            calc_molargk = __calc_molargk;  
            calc_molarfk = __calc_molarfk;  
            calc_specificcpk = __calc_specificcpk;  
            calc_specificcvk = __calc_specificcvk;  
            calc_specifichk = __calc_specifichk;  
            calc_specificuk = __calc_specificuk;  
            calc_specificsk = __calc_specificsk;  
            calc_specificgk = __calc_specificgk;  
            calc_specificfk = __calc_specificfk;  
            calc_visck = __calc_visck;  
            calc_lambk = __calc_lambk;  
            calc_difkk = __calc_difkk;  
            calc_difkkp0 = __calc_difkkp0;   
            calc_wilke = __calc_wilke;  
            calc_bindiff = __calc_bindiff;  
            calc_bindiffp0 = __calc_bindiffp0;  
            calc_bintau = __calc_bintau;  
			this.Model = model;
			this.Nel = model.Nel;
			this.Nsp = model.Nsp; 
			m_elementMassFractions = new DoubleArrayHolder(Nel);  
			m_elementMoleFractions = new DoubleArrayHolder(Nel);  
			m_speciesCp = new DoubleArrayHolder(Nsp);  
			m_speciesCv = new DoubleArrayHolder(Nsp);  
			m_speciesF = new DoubleArrayHolder(Nsp);  
			m_speciesG = new DoubleArrayHolder(Nsp);  
			m_speciesH = new DoubleArrayHolder(Nsp);  
			m_speciesMassFractions = new DoubleArrayHolder(Nsp);  
			m_speciesMolarConcentrations = new DoubleArrayHolder(Nsp);  
			m_speciesMolarCp = new DoubleArrayHolder(Nsp);  
			m_speciesMolarCv = new DoubleArrayHolder(Nsp);  
			m_speciesMolarF = new DoubleArrayHolder(Nsp);  
			m_speciesMolarG = new DoubleArrayHolder(Nsp);  
			m_speciesMolarH = new DoubleArrayHolder(Nsp);  
			m_speciesMolarS = new DoubleArrayHolder(Nsp);  
			m_speciesMolarU = new DoubleArrayHolder(Nsp);  
			m_speciesMoleFractions = new DoubleArrayHolder(Nsp);  
			m_speciesMoleFractionsLog = new DoubleArrayHolder(Nsp);  
			m_speciesS = new DoubleArrayHolder(Nsp);  
			m_speciesSelfDiffusivities = new DoubleArrayHolder(Nsp);  
			m_speciesSelfDiffusivitiesAtP0 = new DoubleArrayHolder(Nsp);  
			m_speciesSpecificCp = new DoubleArrayHolder(Nsp);  
			m_speciesSpecificCv = new DoubleArrayHolder(Nsp);  
			m_speciesSpecificF = new DoubleArrayHolder(Nsp);  
			m_speciesSpecificG = new DoubleArrayHolder(Nsp);  
			m_speciesSpecificH = new DoubleArrayHolder(Nsp);  
			m_speciesSpecificS = new DoubleArrayHolder(Nsp);  
			m_speciesSpecificU = new DoubleArrayHolder(Nsp);  
			m_speciesThermalConductivities = new DoubleArrayHolder(Nsp);  
			m_speciesU = new DoubleArrayHolder(Nsp);  
			m_speciesViscosities = new DoubleArrayHolder(Nsp);  
			 
			m_speciesDiffusivities = new DoubleMatrixHolder(Nsp, (i)=> i+1);  
			m_speciesDiffusivitiesAtP0 = new DoubleMatrixHolder(Nsp, (i)=> i+1);  
			m_speciesThermalDiffusionRatios = new DoubleMatrixHolder(Nsp, (i)=> i+1);  
			m_speciesWilkeMatrix = new DoubleMatrixHolder(Nsp, (i)=> Nsp);  
            SetDefaultHandlers();
			m_temperature.Value = mixtureDefinition.Temperature.ToDouble();
            m_pressure.Value = mixtureDefinition.Pressure.ToDouble();
			m_speciesMoleFractions.Assign(mixtureDefinition.X.Data,
                i => model.GetSpeciesIndex(mixtureDefinition.SpeciesIDs[i]),
                0.0);
			OnCreated();
		}

		partial void OnCreating();
		partial void OnCreated();

		private void DropState(StateChangeCategory category)
		{ 
			m_massDensity.DropState();  
			m_molarDensity.DropState();  
			m_pressure.DropState();  
			m_pressureAtmLog.DropState();  
			m_temperature.DropState();  
			if( category.HasFlag(StateChangeCategory.Temperature) )
			{  
				m_cp.DropState();   
				m_cv.DropState();   
				m_diffusivity.DropState();   
				m_f.DropState();   
				m_g.DropState();   
				m_h.DropState();   
				m_molarCp.DropState();   
				m_molarCv.DropState();   
				m_molarF.DropState();   
				m_molarG.DropState();   
				m_molarH.DropState();   
				m_molarS.DropState();   
				m_molarU.DropState();   
				m_s.DropState();   
				m_speciesCp.DropState();   
				m_speciesCv.DropState();   
				m_speciesDiffusivities.DropState();   
				m_speciesDiffusivitiesAtP0.DropState();   
				m_speciesF.DropState();   
				m_speciesG.DropState();   
				m_speciesH.DropState();   
				m_speciesMolarCp.DropState();   
				m_speciesMolarCv.DropState();   
				m_speciesMolarF.DropState();   
				m_speciesMolarG.DropState();   
				m_speciesMolarH.DropState();   
				m_speciesMolarS.DropState();   
				m_speciesMolarU.DropState();   
				m_speciesS.DropState();   
				m_speciesSelfDiffusivities.DropState();   
				m_speciesSelfDiffusivitiesAtP0.DropState();   
				m_speciesSpecificCp.DropState();   
				m_speciesSpecificCv.DropState();   
				m_speciesSpecificF.DropState();   
				m_speciesSpecificG.DropState();   
				m_speciesSpecificH.DropState();   
				m_speciesSpecificS.DropState();   
				m_speciesSpecificU.DropState();   
				m_speciesThermalConductivities.DropState();   
				m_speciesThermalDiffusionRatios.DropState();   
				m_speciesU.DropState();   
				m_speciesViscosities.DropState();   
				m_specificCp.DropState();   
				m_specificCv.DropState();   
				m_specificF.DropState();   
				m_specificG.DropState();   
				m_specificH.DropState();   
				m_specificS.DropState();   
				m_specificU.DropState();   
				m_speedOfSound.DropState();   
				m_temperatureLog.DropState();   
				m_thermalConductivity.DropState();   
				m_u.DropState();   
				m_viscosity.DropState();  
			} 
			if( category.HasFlag(StateChangeCategory.Pressure) )
			{  
				m_speciesDiffusivities.DropState();   
				m_speciesSelfDiffusivities.DropState();  
			}
			if( category.HasFlag(StateChangeCategory.Composition) )
			{  
				m_cp.DropState();   
				m_cv.DropState();   
				m_diffusivity.DropState();   
				m_elementMassFractions.DropState();   
				m_elementMoleFractions.DropState();   
				m_f.DropState();   
				m_g.DropState();   
				m_h.DropState();   
				m_molarCp.DropState();   
				m_molarCv.DropState();   
				m_molarF.DropState();   
				m_molarG.DropState();   
				m_molarH.DropState();   
				m_molarMass.DropState();   
				m_molarS.DropState();   
				m_molarU.DropState();   
				m_s.DropState();   
				m_speciesMassFractions.DropState();   
				m_speciesMoleFractions.DropState();   
				m_speciesMoleFractionsLog.DropState();   
				m_speciesWilkeMatrix.DropState();   
				m_specificCp.DropState();   
				m_specificCv.DropState();   
				m_specificF.DropState();   
				m_specificG.DropState();   
				m_specificH.DropState();   
				m_specificS.DropState();   
				m_specificU.DropState();   
				m_speedOfSound.DropState();   
				m_thermalConductivity.DropState();   
				m_u.DropState();   
				m_viscosity.DropState();  
			}			
			SetDefaultHandlers();
		}

		private void SetDefaultHandlers()
		{
			 
            m_cp.Update = calc_cp_from_cpk;  
            m_cv.Update = calc_cv_from_cvk;  
            m_diffusivity.Update = calc_diff;  
            m_f.Update = calc_f_from_fk;  
            m_g.Update = calc_g_from_gk;  
            m_h.Update = calc_h_from_hk;  
            m_massDensity.Update = calc_massdensity_from_molardensity;  
            m_molarCp.Update = calc_molarcp_from_cp;  
            m_molarCv.Update = calc_molarcv_from_cv;  
            m_molarDensity.Update = calc_molardensity_from_eos;  
            m_molarF.Update = calc_molarf_from_f;  
            m_molarG.Update = calc_molarg_from_g;  
            m_molarH.Update = calc_molarh_from_h;  
            m_molarMass.Update = calc_molarmass_from_xk;  
            m_molarS.Update = calc_molars_from_s;  
            m_molarU.Update = calc_molaru_from_u;  
            m_pressure.Update = calc_pressure_from_eos;  
            m_pressureAtmLog.Update = calc_pressureatmlog;  
            m_s.Update = calc_s_from_sk;  
            m_specificCp.Update = calc_specificcp_from_cp;  
            m_specificCv.Update = calc_specificcv_from_cv;  
            m_specificF.Update = calc_specificf_from_f;  
            m_specificG.Update = calc_specificg_from_g;  
            m_specificH.Update = calc_specifich_from_h;  
            m_specificS.Update = calc_specifics_from_s;  
            m_specificU.Update = calc_specificu_from_u;  
            m_speedOfSound.Update = calc_speedofsound;  
            m_temperature.Update = calc_temperature_from_eos;  
            m_temperatureLog.Update = calc_temperaturelog;  
            m_thermalConductivity.Update = calc_cond;  
            m_u.Update = calc_u_from_uk;  
            m_viscosity.Update = calc_visc;  
			 
            m_elementMassFractions.Update = calc_elyk;  
            m_elementMoleFractions.Update = calc_elxk;  
            m_speciesCp.Update = calc_cpk;  
            m_speciesCv.Update = calc_cvk;  
            m_speciesF.Update = calc_fk;  
            m_speciesG.Update = calc_gk;  
            m_speciesH.Update = calc_hk;  
            m_speciesMassFractions.Update = calc_yk_from_xk;  
            m_speciesMolarConcentrations.Update = calc_ck;  
            m_speciesMolarCp.Update = calc_specificcpk;  
            m_speciesMolarCv.Update = calc_specificcvk;  
            m_speciesMolarF.Update = calc_specificfk;  
            m_speciesMolarG.Update = calc_specificgk;  
            m_speciesMolarH.Update = calc_specifichk;  
            m_speciesMolarS.Update = calc_specificsk;  
            m_speciesMolarU.Update = calc_specificuk;  
            m_speciesMoleFractions.Update = calc_xk_from_yk;  
            m_speciesMoleFractionsLog.Update = calc_xklog;  
            m_speciesS.Update = calc_sk;  
            m_speciesSelfDiffusivities.Update = calc_difkk;  
            m_speciesSelfDiffusivitiesAtP0.Update = calc_difkkp0;  
            m_speciesSpecificCp.Update = calc_molarcpk;  
            m_speciesSpecificCv.Update = calc_molarcvk;  
            m_speciesSpecificF.Update = calc_molarfk;  
            m_speciesSpecificG.Update = calc_molargk;  
            m_speciesSpecificH.Update = calc_molarhk;  
            m_speciesSpecificS.Update = calc_molarsk;  
            m_speciesSpecificU.Update = calc_molaruk;  
            m_speciesThermalConductivities.Update = calc_lambk;  
            m_speciesU.Update = calc_uk;  
            m_speciesViscosities.Update = calc_visck;  
			 
            m_speciesDiffusivities.Update = calc_bindiff;  
            m_speciesDiffusivitiesAtP0.Update = calc_bindiffp0;  
            m_speciesThermalDiffusionRatios.Update = calc_bintau;  
            m_speciesWilkeMatrix.Update = calc_wilke;  
		}


		/// <summary>
		/// Number of Chemical Elements
		/// </summary>
		public int Nel { get; private set; }

		/// <summary>
		/// Number of Chemical Species
		/// </summary>
		public int Nsp { get; private set; }

		 
		/// <summary>
		/// Mixture non-dimensional Ideal Gas Isobaric Heat Capacities (Cp) [~]
		/// </summary>
		[MixtureProperty]
		public double  Cp {  get { return m_cp.Value; }  }  
		/// <summary>
		/// Mixture non-dimensional Ideal Gas Isochoric Heat Capacities (Cv) [~]
		/// </summary>
		[MixtureProperty]
		public double  Cv {  get { return m_cv.Value; }  }  
		/// <summary>
		/// Mixture ideal gas self diffusivities (D_kk) [m**2/sec]
		/// </summary>
		[MixtureProperty]
		public double  Diffusivity {  get { return m_diffusivity.Value; }  }  
		/// <summary>
		/// Mixture non-dimensional Ideal Gas Helmholtz Energy (F) [~]
		/// </summary>
		[MixtureProperty]
		public double  F {  get { return m_f.Value; }  }  
		/// <summary>
		/// Mixture non-dimensional Ideal Gas Gibbs Energy (G) [~]
		/// </summary>
		[MixtureProperty]
		public double  G {  get { return m_g.Value; }  }  
		/// <summary>
		/// Mixture non-dimensional Ideal Gas Enthalpy (H) [~]
		/// </summary>
		[MixtureProperty]
		public double  H {  get { return m_h.Value; }  }  
		/// <summary>
		/// Mixture Mass Density [kg/m**3]
		/// </summary>
		[MixtureProperty]
		public double  MassDensity {  get { return m_massDensity.Value; }  }  
		/// <summary>
		/// Mixture molar Ideal Gas Isobaric Heat Capacities (Cp) [J/K/mol]
		/// </summary>
		[MixtureProperty]
		public double  MolarCp {  get { return m_molarCp.Value; }  }  
		/// <summary>
		/// Mixture molar Ideal Gas Isochoric Heat Capacities (Cv) [J/K/mol]
		/// </summary>
		[MixtureProperty]
		public double  MolarCv {  get { return m_molarCv.Value; }  }  
		/// <summary>
		/// Mixture Molar Density [mol/m**3]
		/// </summary>
		[MixtureProperty]
		public double  MolarDensity {  get { return m_molarDensity.Value; }  }  
		/// <summary>
		/// Mixture molar Ideal Gas Helmholtz Energy (F) [J/mol]
		/// </summary>
		[MixtureProperty]
		public double  MolarF {  get { return m_molarF.Value; }  }  
		/// <summary>
		/// Mixture molar Ideal Gas Gibbs Energy (G) [J/mol]
		/// </summary>
		[MixtureProperty]
		public double  MolarG {  get { return m_molarG.Value; }  }  
		/// <summary>
		/// Mixture molar Ideal Gas Enthalpy (H) [J/mol]
		/// </summary>
		[MixtureProperty]
		public double  MolarH {  get { return m_molarH.Value; }  }  
		/// <summary>
		/// Mixture Molar Mass [kg/mol]
		/// </summary>
		[MixtureProperty]
		public double  MolarMass {  get { return m_molarMass.Value; }  }  
		/// <summary>
		/// Mixture molar Ideal Gas Entropy (S) [J/K/mol]
		/// </summary>
		[MixtureProperty]
		public double  MolarS {  get { return m_molarS.Value; }  }  
		/// <summary>
		/// Mixture molar Ideal Gas Energy (U) [J/mol]
		/// </summary>
		[MixtureProperty]
		public double  MolarU {  get { return m_molarU.Value; }  }  
		/// <summary>
		/// Mixture Pressure [Pa]
		/// </summary>
		[MixtureProperty]
		public double  Pressure {  get { return m_pressure.Value; }  }  
		/// <summary>
		/// Mixture Pressure [log(atm)]
		/// </summary>
		[MixtureProperty]
		public double  PressureAtmLog {  get { return m_pressureAtmLog.Value; }  }  
		/// <summary>
		/// Mixture non-dimensional Ideal Gas Entropy (S) [~]
		/// </summary>
		[MixtureProperty]
		public double  S {  get { return m_s.Value; }  }  
		/// <summary>
		/// Mixture specific Ideal Gas Isobaric Heat Capacities (Cp) [J/K/kg]
		/// </summary>
		[MixtureProperty]
		public double  SpecificCp {  get { return m_specificCp.Value; }  }  
		/// <summary>
		/// Mixture specific Ideal Gas Isochoric Heat Capacities (Cv) [J/K/kg]
		/// </summary>
		[MixtureProperty]
		public double  SpecificCv {  get { return m_specificCv.Value; }  }  
		/// <summary>
		/// Mixture specific Ideal Gas Helmholtz Energy (F) [J/kg]
		/// </summary>
		[MixtureProperty]
		public double  SpecificF {  get { return m_specificF.Value; }  }  
		/// <summary>
		/// Mixture specific Ideal Gas Gibbs Energy (G) [J/kg]
		/// </summary>
		[MixtureProperty]
		public double  SpecificG {  get { return m_specificG.Value; }  }  
		/// <summary>
		/// Mixture specific Ideal Gas Enthalpy (H) [J/kg]
		/// </summary>
		[MixtureProperty]
		public double  SpecificH {  get { return m_specificH.Value; }  }  
		/// <summary>
		/// Mixture specific Ideal Gas Entropy (S) [J/K/kg]
		/// </summary>
		[MixtureProperty]
		public double  SpecificS {  get { return m_specificS.Value; }  }  
		/// <summary>
		/// Mixture specific Ideal Gas Energy (U) [J/kg]
		/// </summary>
		[MixtureProperty]
		public double  SpecificU {  get { return m_specificU.Value; }  }  
		/// <summary>
		/// Mixture Ideal Gas Speed of Sound (C) [m/sec]
		/// </summary>
		[MixtureProperty]
		public double  SpeedOfSound {  get { return m_speedOfSound.Value; }  }  
		/// <summary>
		/// Mixture temperature [K]
		/// </summary>
		[MixtureProperty]
		public double  Temperature {  get { return m_temperature.Value; }  }  
		/// <summary>
		/// Mixture temperature [log(K)]
		/// </summary>
		[MixtureProperty]
		public double  TemperatureLog {  get { return m_temperatureLog.Value; }  }  
		/// <summary>
		/// Mixture ideal gas thermal conductivities (La_k) [W/m/K]
		/// </summary>
		[MixtureProperty]
		public double  ThermalConductivity {  get { return m_thermalConductivity.Value; }  }  
		/// <summary>
		/// Mixture non-dimensional Ideal Gas Energy (U) [~]
		/// </summary>
		[MixtureProperty]
		public double  U {  get { return m_u.Value; }  }  
		/// <summary>
		/// Mixture ideal gas dynamic viscosities (Nu_k) [Pa * sec]
		/// </summary>
		[MixtureProperty]
		public double  Viscosity {  get { return m_viscosity.Value; }  }  

		 
		/// <summary>
		/// Species Mass Fractions
		/// </summary>
		[MixtureProperty]
		public ReadOnlyArray<double>  ElementMassFractions {  get { return m_elementMassFractions.Array; }  }  
		/// <summary>
		/// Species Mole Fractions
		/// </summary>
		[MixtureProperty]
		public ReadOnlyArray<double>  ElementMoleFractions {  get { return m_elementMoleFractions.Array; }  }  
		/// <summary>
		/// Species non-dimensional Ideal Gas Isobaric Heat Capacities (Cp) [~]
		/// </summary>
		[MixtureProperty]
		public ReadOnlyArray<double>  SpeciesCp {  get { return m_speciesCp.Array; }  }  
		/// <summary>
		/// Species non-dimensional Ideal Gas Isochoric Heat Capacities (Cv) [~]
		/// </summary>
		[MixtureProperty]
		public ReadOnlyArray<double>  SpeciesCv {  get { return m_speciesCv.Array; }  }  
		/// <summary>
		/// Species non-dimensional Ideal Gas Helmholtz Energy (F) [~]
		/// </summary>
		[MixtureProperty]
		public ReadOnlyArray<double>  SpeciesF {  get { return m_speciesF.Array; }  }  
		/// <summary>
		/// Species non-dimensional Ideal Gas Gibbs Energy (G) [~]
		/// </summary>
		[MixtureProperty]
		public ReadOnlyArray<double>  SpeciesG {  get { return m_speciesG.Array; }  }  
		/// <summary>
		/// Species non-dimensional Ideal Gas Enthalpy (H) [~]
		/// </summary>
		[MixtureProperty]
		public ReadOnlyArray<double>  SpeciesH {  get { return m_speciesH.Array; }  }  
		/// <summary>
		/// Species Mass Fractions
		/// </summary>
		[MixtureProperty]
		public ReadOnlyArray<double>  SpeciesMassFractions {  get { return m_speciesMassFractions.Array; }  }  
		/// <summary>
		/// Species Molar Concentrations
		/// </summary>
		[MixtureProperty]
		public ReadOnlyArray<double>  SpeciesMolarConcentrations {  get { return m_speciesMolarConcentrations.Array; }  }  
		/// <summary>
		/// Species molar Ideal Gas Isobaric Heat Capacities (Cp) [J/K/mol]
		/// </summary>
		[MixtureProperty]
		public ReadOnlyArray<double>  SpeciesMolarCp {  get { return m_speciesMolarCp.Array; }  }  
		/// <summary>
		/// Species molar Ideal Gas Isochoric Heat Capacities (Cv) [J/K/mol]
		/// </summary>
		[MixtureProperty]
		public ReadOnlyArray<double>  SpeciesMolarCv {  get { return m_speciesMolarCv.Array; }  }  
		/// <summary>
		/// Species molar Ideal Gas Helmholtz Energy (F) [J/mol]
		/// </summary>
		[MixtureProperty]
		public ReadOnlyArray<double>  SpeciesMolarF {  get { return m_speciesMolarF.Array; }  }  
		/// <summary>
		/// Species molar Ideal Gas Gibbs Energy (G) [J/mol]
		/// </summary>
		[MixtureProperty]
		public ReadOnlyArray<double>  SpeciesMolarG {  get { return m_speciesMolarG.Array; }  }  
		/// <summary>
		/// Species molar Ideal Gas Enthalpy (H) [J/mol]
		/// </summary>
		[MixtureProperty]
		public ReadOnlyArray<double>  SpeciesMolarH {  get { return m_speciesMolarH.Array; }  }  
		/// <summary>
		/// Species molar Ideal Gas Entropy (S) [J/K/mol]
		/// </summary>
		[MixtureProperty]
		public ReadOnlyArray<double>  SpeciesMolarS {  get { return m_speciesMolarS.Array; }  }  
		/// <summary>
		/// Species molar Ideal Gas Energy (U) [J/mol]
		/// </summary>
		[MixtureProperty]
		public ReadOnlyArray<double>  SpeciesMolarU {  get { return m_speciesMolarU.Array; }  }  
		/// <summary>
		/// Species Mole Fractions
		/// </summary>
		[MixtureProperty]
		public ReadOnlyArray<double>  SpeciesMoleFractions {  get { return m_speciesMoleFractions.Array; }  }  
		/// <summary>
		/// Species Mole Fraction logarithm
		/// </summary>
		[MixtureProperty]
		public ReadOnlyArray<double>  SpeciesMoleFractionsLog {  get { return m_speciesMoleFractionsLog.Array; }  }  
		/// <summary>
		/// Species non-dimensional Ideal Gas Entropy (S) [~]
		/// </summary>
		[MixtureProperty]
		public ReadOnlyArray<double>  SpeciesS {  get { return m_speciesS.Array; }  }  
		/// <summary>
		/// Species ideal gas self diffusivities (D_kk) [m**2/sec]
		/// </summary>
		[MixtureProperty]
		public ReadOnlyArray<double>  SpeciesSelfDiffusivities {  get { return m_speciesSelfDiffusivities.Array; }  }  
		/// <summary>
		/// Species ideal gas self diffusivities as atmospheric pressure (D_kk) [m**2/sec]
		/// </summary>
		[MixtureProperty]
		public ReadOnlyArray<double>  SpeciesSelfDiffusivitiesAtP0 {  get { return m_speciesSelfDiffusivitiesAtP0.Array; }  }  
		/// <summary>
		/// Species specific Ideal Gas Isobaric Heat Capacities (Cp) [J/K/kg]
		/// </summary>
		[MixtureProperty]
		public ReadOnlyArray<double>  SpeciesSpecificCp {  get { return m_speciesSpecificCp.Array; }  }  
		/// <summary>
		/// Species specific Ideal Gas Isochoric Heat Capacities (Cv) [J/K/kg]
		/// </summary>
		[MixtureProperty]
		public ReadOnlyArray<double>  SpeciesSpecificCv {  get { return m_speciesSpecificCv.Array; }  }  
		/// <summary>
		/// Species specific Ideal Gas Helmholtz Energy (F) [J/kg]
		/// </summary>
		[MixtureProperty]
		public ReadOnlyArray<double>  SpeciesSpecificF {  get { return m_speciesSpecificF.Array; }  }  
		/// <summary>
		/// Species specific Ideal Gas Gibbs Energy (G) [J/kg]
		/// </summary>
		[MixtureProperty]
		public ReadOnlyArray<double>  SpeciesSpecificG {  get { return m_speciesSpecificG.Array; }  }  
		/// <summary>
		/// Species specific Ideal Gas Enthalpy (H) [J/kg]
		/// </summary>
		[MixtureProperty]
		public ReadOnlyArray<double>  SpeciesSpecificH {  get { return m_speciesSpecificH.Array; }  }  
		/// <summary>
		/// Species specific Ideal Gas Entropy (S) [J/K/kg]
		/// </summary>
		[MixtureProperty]
		public ReadOnlyArray<double>  SpeciesSpecificS {  get { return m_speciesSpecificS.Array; }  }  
		/// <summary>
		/// Species specific Ideal Gas Energy (U) [J/kg]
		/// </summary>
		[MixtureProperty]
		public ReadOnlyArray<double>  SpeciesSpecificU {  get { return m_speciesSpecificU.Array; }  }  
		/// <summary>
		/// Species ideal gas thermal conductivities (La_k) [W/m/K]
		/// </summary>
		[MixtureProperty]
		public ReadOnlyArray<double>  SpeciesThermalConductivities {  get { return m_speciesThermalConductivities.Array; }  }  
		/// <summary>
		/// Species non-dimensional Ideal Gas Energy (U) [~]
		/// </summary>
		[MixtureProperty]
		public ReadOnlyArray<double>  SpeciesU {  get { return m_speciesU.Array; }  }  
		/// <summary>
		/// Species ideal gas dynamic viscosities (Nu_k) [Pa * sec]
		/// </summary>
		[MixtureProperty]
		public ReadOnlyArray<double>  SpeciesViscosities {  get { return m_speciesViscosities.Array; }  }  

		 
		/// <summary>
		/// Species ideal gas diffusivities (D_jk) [m**2/sec]
		/// </summary>
		[MixtureProperty]
		public ReadOnlyMatrix<double>  SpeciesDiffusivities {  get { return m_speciesDiffusivities.Matrix; }  }  
		/// <summary>
		/// Species ideal gas diffusivities at atmospheric pressure (D_jk) [m**2/sec]
		/// </summary>
		[MixtureProperty]
		public ReadOnlyMatrix<double>  SpeciesDiffusivitiesAtP0 {  get { return m_speciesDiffusivitiesAtP0.Matrix; }  }  
		/// <summary>
		/// Species ideal gas thermal diffusion ratios (Om_ij) [~]
		/// </summary>
		[MixtureProperty]
		public ReadOnlyMatrix<double>  SpeciesThermalDiffusionRatios {  get { return m_speciesThermalDiffusionRatios.Matrix; }  }  
		/// <summary>
		/// Wilke matrix
		/// </summary>
		[MixtureProperty]
		public ReadOnlyMatrix<double>  SpeciesWilkeMatrix {  get { return m_speciesWilkeMatrix.Matrix; }  }  

		#region Handlers
         
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Func<double> calc_speedofsound;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Func<double> calc_pressure_from_eos;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Func<double> calc_temperature_from_eos;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Func<double> calc_molardensity_from_eos;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Func<double> calc_massdensity_from_molardensity;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Func<double> calc_molarmass_from_xk;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Func<double> calc_temperaturelog;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Func<double> calc_pressureatmlog;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Func<double> calc_cp_from_cpk;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Func<double> calc_cv_from_cvk;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Func<double> calc_h_from_hk;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Func<double> calc_u_from_uk;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Func<double> calc_g_from_gk;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Func<double> calc_f_from_fk;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Func<double> calc_s_from_sk;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Func<double> calc_molarcp_from_cp;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Func<double> calc_molarcv_from_cv;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Func<double> calc_molarh_from_h;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Func<double> calc_molaru_from_u;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Func<double> calc_molarg_from_g;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Func<double> calc_molarf_from_f;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Func<double> calc_molars_from_s;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Func<double> calc_specificcp_from_cp;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Func<double> calc_specificcv_from_cv;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Func<double> calc_specifich_from_h;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Func<double> calc_specificu_from_u;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Func<double> calc_specificg_from_g;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Func<double> calc_specificf_from_f;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Func<double> calc_specifics_from_s;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Func<double> calc_visc;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Func<double> calc_cond;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Func<double> calc_diff;  
		 
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Action<double[]> calc_elxk;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Action<double[]> calc_elyk;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Action<double[]> calc_ck;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Action<double[]> calc_xklog;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Action<double[]> calc_xk_from_yk;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Action<double[]> calc_yk_from_xk;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Action<double[]> calc_ck_from_xk;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Action<double[]> calc_cpk;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Action<double[]> calc_cvk;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Action<double[]> calc_hk;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Action<double[]> calc_uk;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Action<double[]> calc_sk;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Action<double[]> calc_gk;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Action<double[]> calc_fk;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Action<double[]> calc_molarcpk;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Action<double[]> calc_molarcvk;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Action<double[]> calc_molarhk;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Action<double[]> calc_molaruk;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Action<double[]> calc_molarsk;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Action<double[]> calc_molargk;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Action<double[]> calc_molarfk;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Action<double[]> calc_specificcpk;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Action<double[]> calc_specificcvk;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Action<double[]> calc_specifichk;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Action<double[]> calc_specificuk;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Action<double[]> calc_specificsk;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Action<double[]> calc_specificgk;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Action<double[]> calc_specificfk;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Action<double[]> calc_visck;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Action<double[]> calc_lambk;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Action<double[]> calc_difkk;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Action<double[]> calc_difkkp0;  
		 
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Action<double[][]> calc_wilke;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Action<double[][]> calc_bindiff;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Action<double[][]> calc_bindiffp0;  
        /// <summary>
        /// 
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private readonly Action<double[][]> calc_bintau;  
		#endregion
	}
}